USE [i8office]
GO

if(exists(select * from sys.objects where name = 'proc_wkf_nodelayout'))
	drop proc proc_wkf_nodelayout
go
create proc proc_wkf_nodelayout(
	@MessageID nvarchar(36),
	@TemplateMessageID nvarchar(36)
)
as
	INSERT INTO [dbo].[WKF_NodeLayout]
			   ([MessageID]
			   ,[NodeKey]
			   ,[X]
			   ,[Y])
		 SELECT @MessageID
			  ,[NodeKey]
			  ,[X]
			  ,[Y]
		  FROM [dbo].[WKF_NodeLayout]
		  WHERE MessageID=@TemplateMessageID